#include "stdafx.h"

#include "errors.h"

namespace funpl
{

namespace debug
{

// Gets the name of the given error code.
const char* error_name(error_code::t error)
{
	using namespace error_code;

	switch (error)
	{
	case unexpected_token: return "unexpected token";
	case invalid_num_literal: return "invalid numeric literal";

	default:
		LEAN_ASSERT_DEBUG(false);
	}

	return "assertion failed";
}

} // namespace

} // namespace